package com.ogawa.chair7808.viewmodel

import android.content.Context
import com.ogawa.base.base.BaseViewModel
import com.ogawa.base.mqtt.MqttManager

class HomeActivityViewModel : BaseViewModel() {
    var isNeedInitMqtt = false
    //    var state = MutableLiveData<String>()


    fun initMqtt(context: Context){
        if (!isNeedInitMqtt){
            MqttManager.getInstance().initClient(context)
        }
    }

    fun userFeedBacks() {
//        launch({
//            loadState.value = LoadState.Loading("")
//            RetrofitManager.INSTANCE.createService(UserApiService::class.java)
//                    .userFeedBacks(mUserFeedBacksRequest)
//                    .dataConvert()
//            state.value = Constant.SUCCESS
//            loadState.value = LoadState.Success("")
//        }
//                , { loadState.value = LoadState.Fail(it.message ?: "") }
//                , {})
    }


}

